// components/dropdown-menu/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    isCityDrop:true,
    isBrandDrop:false,
    isFeaturesDrop:false,
    location:[
      {
        title:'全部',
        amount:'83'
      },
      {
        title:'青山湖区',
        amount:'19'
      },
      {
        title:'南昌县',
        amount:'14'
      },
      {
        title:'红古滩区',
        amount:'11'
      },
      {
        title:'新建区',
        amount:'10'
      },
      {
        title:'东湖区',
        amount:'10'
      },
      {
        title:'进贤县',
        amount:'6'
      },
      {
        title:'西湖区',
        amount:'6'
      },
      {
        title:'青云谱区',
        amount:'5'
      },
      {
        title:'安义县',
        amount:'2'
      }
    ],
    areaOnId:0,
    loadOnId:0,
    isHidden:'true'
  },

  /**
   * 组件的方法列表
   */
  methods: {
  dropdownCityMenu(){
    if(this.data.isCityDrop){
      this.setData({
        isCityDrop:false
      })
    }
    else{
        this.setData({
          isCityDrop:true,
          isBrandDrop:false,
          isFeaturesDrop:false   
         })
    }
  },
  dropdownBrandMenu(){
    if(this.data.isBrandDrop){
      this.setData({
        isBrandDrop:false
      })
    }
    else{
        this.setData({
          isCityDrop:false,
          isBrandDrop:true,
          isFeaturesDrop:false   
         });
      }
  },
  dropdownFeaturesMenu(){
    if(this.data.isFeaturesDrop){
      this.setData({
        isFeaturesDrop:false
      })
    }
      else{
        this.setData({
          isCityDrop:false,
          isBrandDrop:false,
          isFeaturesDrop:true   
         })
      }
  },
  areaOn(e){
    let areaOnId=e.currentTarget.dataset.index;
    this.setData({
      areaOnId
    })
  },
  setSwiperCurrent(e){
    console.log(e);
    let isHidden=e.currentTarget.dataset.current;
    this.setData({
      isHidden
    })
    console.log(typeof(isHidden));
    console.log(typeof(e.currentTarget.dataset.num))
  }
  }
})
